<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Reg extends MY_Controller {

	public $data 	= 	array();
 	public $_template = array();
	public function __construct() {

		parent::__construct(); //for CI 2.x users 
		$this->load->module_model('member', 'reg_model', 'reg');
		$this->load->helper('text');
		$this->user = $this->access->get_user();
		$this->load->helper('url');
		$this->access->restrict();
		
		$this->load->dbutil();
		$this->load->helper('download');
	}
	
 
	public function index($index=null) 
	{
		//echo $index;
		$data['ItemID'] = 'User';
		$data['title'] = 'Danh sách Học viên Đăng ký học Trực tuyến';
		$data['description'] = 'Danh sách Đăng ký Học viên';
		
		$this->load->library('basic_library');
		$this->load->library('pagination');
		$this->load->helper('url');
		$config = array();
		$config['base_url'] 	= base_url().'member/reg/index/';
		$config['total_rows'] 	= $this->reg->count_all_dangky();
		$config['per_page'] 	= 50;
		$config['uri_segment']	= 4;
		$config['num_links'] = 5;
		$config['first_link'] = 'First';
		$config['last_link'] = 'Last';
		$config['next_link'] = 'Next';
		$config['prev_link'] = 'Prev';
		$this->pagination->initialize($config);
		$page = ($this->uri->segment(4))? $this->uri->segment(4):0;
		//echo $page;
		$data['alldata'] 	= $this->reg->get_all_dangky($config['per_page'], $page);
		$data['lops'] 		= $this->reg->get_tenlop();
		$data['links'] 		= $this->pagination->create_links();
		
		$this->_template['page']	= 'regstudent/list';
		$this->system_library->load($this->_template['page'], $data);
	
	}
		
	
}

/* End of file welcome.php */
/* Location: ./application/controllers/reg.php */